//
//  SystemMessageTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/20.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "SystemMessageTableViewCell.h"

@implementation SystemMessageTableViewCell{
    GLGWImageView * leftImageView;
    GLGWLabel * celltitleLabel;
    GLGWLabel * timeLabel;
    GLGWLabel * miasoShuLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(15), KScreenWidth - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(80)) inSuperView:self];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        
        leftImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(13), kHeightProportion_In_iPhoneTriploid(20), kWidthProportion_In_iPhoneTriploid(40), kHeightProportion_In_iPhoneTriploid(40)) inSuperView:bankgroundView];
//        leftImageView.backgroundColor = kRandomColor;
//        [leftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.top.bottom.equalTo(bankgroundView).offset(0);
//            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(64)));
//        }];
        //
        celltitleLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(64), kHeightProportion_In_iPhoneTriploid(16), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(120), kHeightProportion_In_iPhoneTriploid(30)) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        celltitleLabel.text = @"我的订单";
//        celltitleLabel.backgroundColor = kRandomColor;
        //
        timeLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:bankgroundView];
        timeLabel.text = @"09:00";
        timeLabel.textAlignment = NSTextAlignmentRight;
        [timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(bankgroundView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(16));
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(40)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(30)));
        }];
        //
        miasoShuLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(celltitleLabel.x, kY_With_View(celltitleLabel, 0), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(80), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
//        miasoShuLabel.backgroundColor = kRandomColor;
        miasoShuLabel.text = @"下单成功HK20180814145325下单成功HK20180814145325下单成功HK20180814145325下单成功HK20180814145325";
        
    }
    return self;
}

-(void)setImageNameStr:(NSString *)imageNameStr{
    _imageNameStr = imageNameStr;
    leftImageView.imageName = _imageNameStr;
}

-(void)setLeftTitStr:(NSString *)leftTitStr{
    _leftTitStr = leftTitStr;
    celltitleLabel.text = _leftTitStr;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
